Vcenter Guest LinuxConfiguration

Vcenter Guest LinuxConfiguration
Vcenter Guest LinuxConfiguration

Guest customization Settings to customize a Linux guest operating system.

The Vcenter Guest LinuxConfiguration schema contains settings that identify a Linux machine in the same way that the Vcenter Guest WindowsConfiguration schema identifies a Windows machine.

This schema was added in vSphere API 7.0.0.0.

JSON Example
{
    "hostname": {
        "type": "string",
        "fixed_name": "string",
        "prefix": "string"
    },
    "domain": "string",
    "time_zone": "string",
    "script_text": "string",
    "compatible_customization_method": "string"
}
hostname
Required

The network host name of the Linux virtual machine.

This property was added in vSphere API 7.0.0.0.

string
domain
Required

The fully qualified domain name.

This property was added in vSphere API 7.0.0.0.

string
time_zone
Optional

The case-sensitive time zone, such as Europe/Sofia. Valid time zone values are based on the tz (time zone) database used by Linux. The values are strings (string) in the form "Area/Location," in which Area is a continent or ocean name, and Location is the city, island, or other regional designation.

See the https://kb.vmware.com/kb/2145518 for a list of supported time zones for different versions in Linux.

This property was added in vSphere API 7.0.0.0.

If missing or null, time zone is not modified inside guest operating system.

string
script_text
Optional

The script to run before and after Linux guest customization.
The max size of the script is 65536 bytes. As long as the script (shell, perl, python...) has the right "#!" in the header, it is supported. The caller should not assume any environment variables when the script is run.

The script is invoked by the customization engine using the command line: 1) with argument "precustomization" before customization, 2) with argument "postcustomization" after customization. The script should parse this argument and implement pre-customization or post-customization task code details in the corresponding block.

A Linux shell script example:

if [ x$1 == x"precustomization" ]; then  
echo "Do Precustomization tasks"  
#code for pre-customization actions...  
elif [ x$1 == x"postcustomization" ]; then  
echo "Do Postcustomization tasks"  
#code for post-customization actions...  
fi  

This property was added in vSphere API 7.0.0.0.

If missing or null, no script will be executed.

string
compatible_customization_method
Optional

The compatible customization method is an identifier of a customization strategy which is implementable in a group of Linux operating systems. This value does not need to be set if your operating system is officially supported by VMware guest operating system customization. When using a Linux operating system which hasn't been officially supported and it is designed to be 100% bug-for-bug compatible with an officially supported Linux operating system, it can be customized by an existing customization method.

Please set the compatible customization method to a supported string value e.g. "GOSC_METHOD_1".
See all the supported compatible customization methods in https://kb.vmware.com/s/article/95903

This property was added in vSphere API 8.0.3.0.

If missing or null, the customization may fail in a Linux operating systems which hasn't been officially supported.